<?php

namespace app\admin\validate;

use think\Validate;
use app\common\Error;

class Client extends Validate
{
    protected $rule = [
        'id' => 'require',
        'name' => 'require',
        'dy_key' => 'require',
    ];

    protected $message = [
        'id.require' => Error::ID_NOT_EXIXTS,
        'name.require' => Error::NAME_NOT_EXIXTS,
        'dy_key.require' => Error::DY_KEY_NOT_EXIXTS,
    ];

    protected $scene = [
        'add' => ['name', 'dy_key'],
        'edit' => ['id', 'name', 'dy_key'],
        'delete' => ['id'],
        'detail' => ['id'],
    ];
}